feat(erc4626): use injected OAV input token for approvals - #35
Merged
Merged
Conversation
ajag408
added this pull request to stack #36
September 11, 2026 05:47
ajag408
requested review from
Philippoes,
aditya172926,
auralshin,
dnehl,
jdomingos,
nicolasbrugneaux and
raiseerco
September 11, 2026 05:49
auralshin
previously approved these changes
Sep 17, 2026
Base automatically changed from
eng-3209-erc4626-runtime-oav-injection
to
main
September 17, 2026 19:39
ajag408
force-pushed
the
eng-3209-oav-injected-input-token
branch
from
September 17, 2026 19:39
34b92e8 to
585b6b8
Compare
There was a problem hiding this comment.
Risk: medium. Left a non-blocking comment and did not approve: this changes ERC-4626 approval allowlisting for injected OAVs, which is above the low-risk approval threshold. Reviewers were not assigned because two or more are already requested.
Sent by Cursor Approval Agent: Pull Request Router and Approver
raiseerco
approved these changes
Sep 17, 2026
aditya172926
approved these changes
Sep 17, 2026
Philippoes
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
allocatorVaultInputTokenAddressonFeeConfiguration(types + JSON schema) and read it in the ERC-4626 validator.getBaseVaultForChainwithsynthesizeInjectedVault. StaticvaultInfoMaplookup is unchanged.@yieldxyz/shieldstays at1.7.0on this branch (no version bump in this PR).QA Proof
pnpm test -- erc4626.validator.test), including thecontext-injected allocator vaults (runtime OAV)suite. Screenshot attached.handleJsonRequestwith the new context field on a Lido stake tx returnsok: true(Lido ignores the ERC-4626 fields; the point is that the request is notSCHEMA_VALIDATION_ERROR):{"ok":true,"apiVersion":"1.0","result":{"isValid":true,"detectedType":"STAKE"},"meta":{"requestHash":"259aec5a7b4ead52feff152073b8ea28fd9e9ccbd66b140cd5b57a9b41aa0ff5"}}pnpm testreported 6122 passing assertions. The run exited non-zero because the Tron Jest worker crashed on circularreq/resserialization —native-staking.validator.test.tsfailed to run, not on an assertion. Unrelated to this change.What Needs to Be QA'd in Staging
allocatorVaultInputTokenAddressmatchestx.tofeeConfiguration(no input-token field)contextis omittedShieldValidationServicedoes not populatecontextyet, so staging cannot fully exercise injected OAVs until that monorepo wiring lands. The Shield-side contract for this PR is the unit + schema checks above.QA Team Notification
Note
Medium Risk
Changes ERC-4626 approval whitelisting for context-injected OAVs and breaks address-only clients until they send
allocatorVaultInputTokenAddress; SUPPLY/WITHDRAW behavior is preserved with fallback.Overview
Adds optional
allocatorVaultInputTokenAddressto validationcontext.feeConfiguration(types + JSON schema) so runtime-injected allocator vaults (OAVs) can declare which ERC-20 must be approved.The ERC-4626 validator now tracks injected OAVs as address → input token and builds vault metadata via
synthesizeInjectedVaultinstead of copying the yield’s base vault token for every injected address. SUPPLY/WITHDRAW still work with address-onlyallocatorVaultAddress(input token falls back to the base vault). APPROVAL to an injected OAV requires the new field:tx.tomust match the declared input token, including meta-vault cases where that token differs from the parent vault’s USDC (etc.). Address-only injection no longer whitelists approvals to the parent input token.Unit tests cover match/mismatch, omitted input token, and meta-vault approval paths.
Reviewed by Cursor Bugbot for commit 585b6b8. Configure here.